local BagItem = BagItem or BaseClass(BaseItem)

function BagItem:__init(parent)
	self.base_file = "Bag"
	self.layout_file = "BagItem"
	self.need_refresh_data = false
	self.data = nil
	self:Load()
end

function BagItem:LoadSuccess()
	if self.need_refresh_data then
		self:SetData(self.data)
	end
end

function BagItem:SetData(data)
	self.data = data
	if self.is_loaded then
		self.need_refresh_data = true
		return
	end
end

return BagItem